<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>按钮</title>
</head>
<style>
    body{
        background-color: azure;
    }
    .wrapper{
        position: absolute;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .wrapper button{
        width: 7vw;
        height: 6vh;
        line-height: 6vh;
        border-radius: 6px;
        border: 1px solid #c3c3c3;
    }
</style>
<body>
    <div class="wrapper">
        <button onclick="change()">CLIKE ME</button>
    </div>

    <script>
        // 随机数改变颜色
        function change(){
            var color1 = Math.floor(Math.random() * 255);
            var color2 = Math.floor(Math.random() * 255);
            var color3 = Math.floor(Math.random() * 255);
            document.body.style.backgroundColor='rgb('+ color1 + ','+ color2 +','+ color3 +')';
        }
    </script>
</body>
</html>